/*
 * Copyright (C) 2022 Parisi Alessandro
 * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
 *
 * MaterialFX is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * MaterialFX is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with MaterialFX.  If not, see <http://www.gnu.org/licenses/>.
 */

@import "Fonts.css";
@import "MFXColors.css";

.mfx-text-field {
	-mfx-main: -mfx-purple;

	-fx-background-color: white;
	-fx-background-radius: 5;
	-fx-border-color: lightgray;
	-fx-border-radius: 5;
	-fx-padding: 5;

	-fx-font-family: "Open Sans Regular";
}

.mfx-text-field:readonly,
.mfx-text-field:readonly .text-field {
	-fx-cursor: default;
}

.mfx-text-field .text-field {
	-fx-highlight-fill: #ECE0FD; /* Selected text highlight */
	-fx-prompt-text-fill: -mfx-text-me; /* Prompt text color */
}

.mfx-text-field .text-field .text {
	-fx-font-smoothing-type: lcd;
}

.mfx-text-field:focus-within {
	-fx-background-insets: 2;
	-fx-border-color: -mfx-main;
	-fx-border-width: 1.5;
	-fx-border-insets: -0.5;
}

.mfx-text-field .floating-text {
	-fx-font-family: "Open Sans Regular";
	-fx-text-fill: -mfx-text-he;
}

.mfx-text-field:floating .floating-text {
	-fx-background-color: white;
}

.mfx-text-field:focus-within .floating-text {
	-fx-text-fill: -mfx-main;
}

.mfx-text-field .text-field {
	-fx-text-box-border: transparent;
	-fx-background-color: transparent;
	-fx-backrgound-insets: 0;
	-fx-padding: 0;
}

.mfx-text-field .text-field:focused {
	-fx-focus-color: transparent;
	-fx-faint-focus-color: transparent;
}

.mfx-text-field:disabled {
	-fx-border-color: rgba(0, 0, 0, 0.1);
}

.mfx-text-field:disabled .floating-text {
	-fx-text-fill: -mfx-text-disabled;
}

.mfx-text-field:disabled .text-field {
	-fx-text-inner-color: -mfx-text-disabled;
}